<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link rel="stylesheet" type="text/css" href="booking.css" />
<script type = "text/JavaScript" src = "payment.js">
    </script>
<?php
$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
  $username=$_POST['username'];
  $password=$_POST['password'];
  $name=$_POST['name'];
  $gender=$_POST['gender'];
 $y=$_POST['y'];
 $m=$_POST['m'];
 $d=$_POST['d'];
 
 $dob=date('Y-m-d',mktime(0,0,0,$m,$d,$y));
 
 
  
  $age=$_POST['age'];
  $passport=$_POST['passport'];
  $nationality=$_POST['nationality'];
  $email=$_POST['email'];
  $contact=$_POST['contact'];
  $address=$_POST['address'];
    
  $sql="INSERT INTO customers(username,password,name,gender,dob,age,passport,nationality,email,contact,address) VALUES('$username','$password','$name','$gender','$dob','$age','$passport','$nationality','$email','$contact','$address')"; 
  
  $sql2="INSERT INTO userlogin (user_id,password) VALUES ('$username','$password')";
  
  if(!mysql_query($sql,$con))
  {
  die('error:'.mysql_error());
  }
  
  if(!mysql_query($sql2,$con))
  {
  die('error:'.mysql_error());
  }
  
  mysql_close($con);
  
  ?>
  <script language="javascript"> 
		 alert("Registration successful, You can now login "); window.location.href='booking.php'; </script> 
</head>

<body>

</body>
</html>